package com.biz.primus.ms.depot.dao.ro;

import com.biz.primus.base.redis.annotation.Ro;
import com.biz.primus.base.redis.annotation.RoSortedSet;
import com.biz.primus.base.redis.bean.BaseRedisObject;
import com.biz.primus.common.utils.CopyUtils;
import com.biz.primus.ms.depot.dao.po.DepotDeliverPrice;
import lombok.Getter;
import lombok.Setter;

import java.sql.Timestamp;

/**
 * DepotDeliverPriceRo
 * <p>
 * key(depot:deliver:price:${depotCode})
 *
 * @author JKLiues
 * @date 2017年10月23日
 */
@Getter
@Setter
@Ro(key = "depot:deliver:price")
@RoSortedSet(key = "list", score = "id")
public class DepotDeliverPriceRo extends BaseRedisObject<String> {

    private static final long serialVersionUID = -8477797115606723167L;
    /**
     * 门店编码
     */
    private String depotCode;

    /**
     * 门店名称
     */
    private String name;

    /**
     * 正常门店起送价
     */
    private Integer price;

    /**
     * 门店活动价起始时间
     */
    private Timestamp promotionBegin;

    /**
     * 门店活动价截止时间
     */
    private Timestamp promotionEnd;

    /**
     * 活动门店起送价
     */
    private Integer promotionPrice;

    public DepotDeliverPriceRo(DepotDeliverPrice depotDeliverPrice) {
        CopyUtils.copyProperties(depotDeliverPrice, this);
        this.setId(depotDeliverPrice.getDepotCode());
    }
}